package jogs.client;

import java.io.PrintStream;

public class ListObject
{
	
	private String text;
	/*Type of object.
	 * 0=ROOM
	 * 1=User
	 * 2=table
	 */
	private int type;		
	//for Tables
	private int status;
	private String gameType;
	private PrintStream out;
	
	public ListObject(String _text, int _type, PrintStream _out)
	{
		text = _text;
		type = _type;
		status = 0;
		out = _out;
		gameType = null;
	}
	
	public ListObject(String _text, int _type, PrintStream _out,int _status, String _gameType)
	{
		text = _text;
		type = _type;
		status = _status;
		out = _out;
		gameType = _gameType;
	}
	
	public String toString()
	{
		return text;
	}
	
	public int getStatus()
	{
		return status;
	}
	
	public synchronized void send(String message)
	{
		out.println(message);
	}
	
	public String getGameType()
	{
		return gameType;
	}
	
	public int getType()
	{
		return type;
	}
	
}
